
package com.cmc.service.impl;

import java.util.List;

import com.cmc.service.impl.BaseManager;
import com.cmc.model.WorkType;
import com.cmc.dao.WorkTypeDao;
import com.cmc.service.WorkTypeManager;

public class WorkTypeManagerImpl extends BaseManager implements WorkTypeManager {
    private WorkTypeDao dao;

    /**
     * Set the Dao for communication with the data layer.
     * @param dao
     */
    public void setWorkTypeDao(WorkTypeDao dao) {
        this.dao = dao;
    }

    /**
     * @see com.cmc.service.WorkTypeManager#getWorkTypes(com.cmc.model.WorkType)
     */
    public List getWorkTypes(final WorkType workType) {
        return dao.getWorkTypes(workType);
    }

    /**
     * @see com.cmc.service.WorkTypeManager#getWorkType(String id)
     */
    public WorkType getWorkType(final String id) {
        return dao.getWorkType(new Long(id));
    }

    /**
     * @see com.cmc.service.WorkTypeManager#saveWorkType(WorkType workType)
     */
    public void saveWorkType(WorkType workType) {
        dao.saveWorkType(workType);
    }

    /**
     * @see com.cmc.service.WorkTypeManager#removeWorkType(String id)
     */
    public void removeWorkType(final String id) {
        dao.removeWorkType(new Long(id));
    }
}
